/*
 * 文件上传
 */
import { postRequest, getRequest, download } from '/@/lib/axios';

export const fileApi = {
  uploadFile: (params) => {
    return postRequest(`/sys/common/upload`,params);
  },

  /**
   * 分页查询
   */
  queryPage: (param) => {
    return postRequest('/sys/common/searchPage', param);
  },

  /**
   * 下载文件流（根据fileKey） @author 胡克
   */
  downLoadFile: (fileName, fileKey) => {
    return download(fileName, `/sys/common/download?attaId=${fileKey}`);
  },
};
